﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI.Selection;

namespace WallCreateAndEdit.WallModule
{
	public class WallFilter : ISelectionFilter
	{
		public bool AllowElement(Element elem)
		{
			if (elem.Category == null)
			{
				return false;
			}
			if (null == elem.Category.Id)
			{
				return false;
			}
			string a = elem.get_Parameter(BuiltInParameter.ELEM_FAMILY_PARAM).AsValueString();
			return !(a == "幕墙") && (-2000011 == elem.Category.Id.IntegerValue || -2003500 == elem.Category.Id.IntegerValue);
		}

		public bool AllowReference(Reference reference, XYZ pos)
		{
			return false;
		}
	}
}
